//+------------------------------------------------------------------+
//|                                                           mm.mq4 |
//|                        Copyright 2013, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2013, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#include <basic.mqh>

extern double exTradeRisk = 2;

void mm_init(){
   /*
   Print(">>>>>>>MM>>>>>>>>>");
   Print("Account balance = ",AccountBalance());
   Print("accountLeverage",AccountLeverage()); // value = 200
   Print("Lotsize",MarketInfo(Symbol(), MODE_LOTSIZE)); // value = 100000
   Print("PipWert",MarketInfo(Symbol(), MODE_LOTSIZE)/10000); // 
   Print("lotSize fuer d10Pip", mm_getLotSize(10));
   Print("<<<<<<<MM<<<<<<<<<");
   */
}


double mm_getLotSizeByPrice(double buyPrice, double slPrice){
   double sl;
}  

double mm_getLotSize(int pips){

   b_debug("pips: " + pips);
   Print("pips: " + pips);
   double lotSize = NormalizeDouble(AccountBalance( )*exTradeRisk/100/(pips*(MarketInfo(Symbol(), MODE_LOTSIZE)/10000)),2);
   b_debug("lotSize: " + lotSize);
   return (lotSize);
}

//+------------------------------------------------------------------+
//| My function                                                      |
//+------------------------------------------------------------------+
// int MyCalculator(int value,int value2)
//   {
//    return(value+value2);
//   }
//+------------------------------------------------------------------+